package cn.baimo.pojo;

import java.io.Serializable;

/**
 * ClassName: Topic
 * Description:话题表实体类
 * date: 2020/8/28 0028 15:30:46
 * <p>
 * topicId	int	            主键，自增	        话题id
 * name	    varchar(255)	非空	                话题名
 * mid	    int	            非空，外键microblog表	微博编号
 *
 * @author BaiMo
 * @since JDK 1.8
 */
public class Topic implements Serializable {
    private int topicId;//话题id
    private String name;//话题名
    private MicroBlog microBlog;//微博

    public Topic(int topicId, String name, MicroBlog microBlog) {
        this.topicId = topicId;
        this.name = name;
        this.microBlog = microBlog;
    }

    public Topic() {
    }

    @Override
    public String toString() {
        return "Topic{" +
                "topicId=" + topicId +
                ", name='" + name + '\'' +
                ", microBlog=" + microBlog +
                '}';
    }

    public int getTopicId() {
        return topicId;
    }

    public void setTopicId(int topicId) {
        this.topicId = topicId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public MicroBlog getMicroBlog() {
        return microBlog;
    }

    public void setMicroBlog(MicroBlog microBlog) {
        this.microBlog = microBlog;
    }
}
